package com.lastmile.activities;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.view.View;
import android.view.Window;
import android.widget.LinearLayout;

import com.lastmile.R;

public class SplashActivity extends Activity {
	
	protected static final String TAG = SplashActivity.class.getSimpleName();
	
	private LinearLayout mContainer;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		Log.i(TAG, "onCreate");
		super.onCreate(savedInstanceState);
		// No Title bar
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.splash);
		mContainer = (LinearLayout) findViewById(R.id.splash_container);
		
		new Handler().postDelayed(new Runnable(){

			@Override
			public void run() {
				Intent it=new Intent(SplashActivity.this,MainActivity.class);
				startActivity(it);
				finish();
			}
        	
        }, 2000);
	}
	
	@Override
	protected void onResume() {
		super.onResume();
	}

	@Override
	protected void onStart() {
		super.onStart();
		Log.i(TAG, "onStart");
		mContainer.setVisibility(View.VISIBLE);
	}

}
